{block name=report-classes}
<div class="row">
  <div class="col-sm-12">
    <a href="javascript:void(0);" onClick="exportPageToCSV($(this),$('#print-dailypayments'),'dailypayments.csv');" class="btn btn-info report-green"><span>Export CSV</span></a>
  </div>
</div>
<div class="row form">
  <div class="col-sm-12">
    <a href="javascript:void(0);" onClick="printArea('print-dailypayments');" class="btn btn-info report-green"><span>Print</span></a>
  </div>
</div>
<div id="print-dailypayments">
{foreach $classterms as $term}
<div class="row term">
  <div class="col-sm-12">
    <h2 class="title"> {$term.term_name} - {$term.term_region}<!-- {$ct.agegroup_name} | {$ct.class_start_time|date_format:"%H:%M %p"} - {$ct.class_end_time|date_format:"%H:%M %p"} | {$ct.location_suburb}, {$ct.location_state} --></h2>
  </div>
  <div class="col-sm-12">
  {foreach $term.locations as $loc}
    <h3 class="title">{$loc.location_suburb} - {$loc.location_name} </h3>
    <table class="table table-striped lblue">
      <thead>
        <th>Date</th>
        <th>Class</th>
        <th>Parent</th>
        <th>Email</th>
        <th>Telephone</th>
        <th>Status</th>
        <th>Charged Amount</th>
        <th>Discount Amount</th>
        <th>Additional Amount</th>
      </thead>
      <tbody>
      {foreach $loc.classes as $class}
        {foreach $class.payments as $ct}
          <tr>
            <td>{$ct.payment_created}</td>
            <td>{$class.class_name} - {$class.agegroup_name}</td>
            <td>{$ct.user_gname} {$ct.user_surname}</td>
            <td>{$ct.user_email}</td>
            <td>{$ct.address_telephone}</td>
            <td>{$ct.status_name}</td>
            <td>${$ct.payment_charged_amount}</td>
            <td>${$ct.payment_discount}</td>
            <td>${$ct.payment_additional}</td>
          </tr>
        {/foreach}
      {/foreach}
      </tbody>
    </table>
    {/foreach}
  </div>
</div>
{/foreach}
</div>
{/block} 


